package com.jumper.study.common.api;

public enum ResultCode implements IErrorCode {
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    NOT_FOUND(404, "对象不存在"),
    VALIDATE_FAILED(405, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关访问权限"),

    ORDER_COMPLETE_FAILED(10001, "订单完成失败"),
    ORDER_CANCEL_FAILED(10002, "订单取消失败"),
    ORDER_PRICE_FAILED(10003, "订单价格修改失败");

    private long code;
    private String message;

    private ResultCode(long code, String message) {
        this.code = code;
        this.message = message;
    }

    public long getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
